<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <%@ page import="modelo.Contato"%>
 <%@page import="controle.Controle"%>
  <%@ page import="java.util.ArrayList" %> 
<title>Lista Recados</title>
</head>
<body>
	<form action="ControleServelt" method="post">
		Name :<input type="text" name="nome"><br> 
		Recado :<br />
		<textarea rows="4" cols="15" name="recado"></textarea>
		<br /> <input type="submit" value="salvar"><br />
	</form>
	<hr/>
	Mural de Recados
	<table border="1">
		<tr>
			
			<th>Nome</th>
			<th>Recado</th>
		</tr>
		<%
	
		ArrayList<Contato> contatos = Controle.listarTodos();
		for(Contato c: contatos){
					
		%>
		<tr>
		<td><%=c.getNome() %></td>
		<td><%=c.getRecado() %></td>
		
		</tr>
		<% }%>
	
	</table>
</body>
</html>